home *** CD-ROM | disk | FTP | other *** search
- Routine provided by STARR/Cyrus Corp - UK.
- ------------------------------------------
-
- ** This routine switches off the POWER LED during
- ** the reset routine.
- ** This enables you to run utilities/games that
- ** load off BootBlocks with the filter off
- ** (A500 and some A1000).
-
- Execbase=4
- CoolCapture=46
-
- ** Wait for the drive light to go out
-
- move.l #$fffff,d0
- Wait: subq.l #1,d0
- bne Wait
-
- ** Get new reset address, move old address into
- ** a store and calculate Checksum.
-
- lea reset,a0
- move.l Execbase,a6
- move.l CoolCapture(a6),Normal
- bsr Set_Reset
-
- ** Do the nice colours bit
-
- move.w #$7fff,d0
- move.w d0,$dff096
- move.w d0,$dff09a
- l: move.w d0,$dff180
- subq.l #1,d0
- jmp l
-
- ** This routine writes the reset address
- ** and Calculates the checksum of Exec.
- ** This is done to allow the reset
- ** Routine to be run. If the checksum is
- ** not calculated the Reset routine will
- ** NOT WORK!
-
- Set_Reset: move.l a0,CoolCapture(a6)
- clr.l d0
- move.l d0,d1
- lea 34(a6),a0
- move.b #$16,d0
- Checksum: add.w (a0)+,d1
- dbf d0,Checksum
- not.w d1
- move.w d1,82(a6)
- rts
-
- ** This is the reset routine!
- ** It sets the reset vectors back to what they
- ** were prior to running this program and
- ** calculates the checksum for Exec. Finally,
- ** it turns the power light off and passes
- ** control back to the Initialization routine.
-
- Reset: move.l Normal,a0
- move.l Execbase,a6
- bsr Set_Reset
- bset #1,$bfe001
- rts
-
- ** Store for old reset vector
-
- Normal: dc.l 0
-